package btanalyzer.db.dao;

import java.io.Serializable;

public interface GenericDao<T, ID extends Serializable> {

	/**
	 * save an entity. This can be either a INSERT or UPDATE in the database.
	 * 
	 * @param entity
	 *            the entity to save
	 * 
	 * @return the saved entity
	 */
	T save(final T entity);

	/**
	 * delete an entity from the database.
	 * 
	 * @param entity
	 *            the entity to delete
	 */
	void delete(final T entity);
	
	void flush();

}
